//
//  AyarlarViewTableCell.m
//  TTNETMuzik
//
//  Created by Tugrul OZDEMIR on 07.12.2011.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "MenuItemsTableCell.h"

@implementation MenuItemsTableCell
@synthesize baslik;
@synthesize icon;
- (void)dealloc {
    [baslik release];
    [icon release];
    [super dealloc];
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UIImageView *bg=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
        [bg setImage:[UIImage imageNamed:@"usr-tablecellbg.png"]];
        [bg setClipsToBounds:YES];
        [bg setBackgroundColor:[UIColor clearColor]];
        //[bg setContentMode:UIViewContentModeTop];
        [self setBackgroundView:bg];
        [bg release];
        
        UIImageView *selectedBg=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
        [selectedBg setImage:[UIImage imageNamed:@"usr-tablecellselectedbg.png"]];
        [selectedBg setClipsToBounds:YES];
        [selectedBg setBackgroundColor:[UIColor clearColor]];
        [self setSelectedBackgroundView:selectedBg];
        [selectedBg release];
        
        
        
        self.baslik=[[[UILabel alloc]initWithFrame:CGRectMake(60, 0, 320-60-40, 44)] autorelease];
        [baslik setTextColor:[UIColor whiteColor]];
        [baslik setBackgroundColor:[UIColor clearColor]];
        [baslik setFont:[UIFont boldSystemFontOfSize:20]];
        [self addSubview:baslik];

        self.icon=[[[UIImageView alloc]initWithFrame:CGRectMake(10, 7, 30, 30)] autorelease];
        [icon setContentMode:UIViewContentModeScaleAspectFit];
        [self addSubview:icon];
                      
        // Initialization code
    }
    return self;
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    [super setHighlighted:highlighted animated:animated];
    if (highlighted) {
        [self.baslik setTextColor:[UIColor darkGrayColor]];
    }
    else {
        [baslik setTextColor:[UIColor whiteColor]];
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
